<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ovlivedemo</title>
<style> 
body{ text-align:center} 
.div{ margin:0 auto; width:400px; height:100px; border:1px solid #F00} 
/* css注释：为了观察效果设置宽度 边框 高度等样式 */ 
</style> 
</head>

<body>
<div id="a1"></div>

<script type="text/javascript" src="ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
	var ahost = window.location.host.split(":");
	
	var url=window.location.href;
	var ip=ahost[0];
	var stream="";
	 
	if (url.indexOf("?") != -1){ 
			 //alert(url.substring(url.lastIndexOf('?')+1,url.length));
			stream=url.substring(url.lastIndexOf('?')+1,url.length);　
			var flashvars={
				f: 'rtmp://'+ip+':1937/'+stream,
				c:0,
				p:1,
				lv:1
				};
			var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
			CKobject.embedSWF('ckplayer/ckplayer.swf','a1','ckplayer_a1','600','400',flashvars,params);
			/*
			CKobject.embedSWF(播放器路径,容器id,播放器id/name,播放器宽,播放器高,flashvars的值,其它定义也可省略);
			下面三行是调用html5播放器用到的
			*/
			var  video=['http://'+ip+':2080/live/'+stream+'.m3u8'];
			var support=['iPad','iPhone','ios','android+false','msie10+false'];
			CKobject.embedHTML5('a1','ckplayer_a1',600,400,video,flashvars,support);	
	}else{
			alert("没有流ＩＤ！");
 
	}

	

	
	
	function closelights(){//关灯
		alert(' 本演示不支持开关灯');
	}
	function openlights(){//开灯
		alert(' 本演示不支持开关灯');
	}
  </script>
</body>
</html>
